{% extends "base.html" %}

{% block stylesheets %}
{% endblock %}

{% block content %}
<div class="jumbotron home">
	<div class="container">
		<h1>Setup</h1>
	</div>
</div>
<div class="container main-container">
	<div id="login-container" class="col-md-6 col-md-offset-3">
		<h2 class="text-center">CTF Settings</h2>
		{% for error in errors %}
		<div class="submit-row">
			<div class="alert alert-danger alert-dismissable" role="alert">
			  <span class="sr-only">Error:</span>
			  {{ error }}
			  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
			</div>
		</div>
		{% endfor %}
		<form method="post" accept-charset="utf-8" autocomplete="off" role="form" class="form-horizontal">
			<input type="hidden" name="nonce" value="{{nonce}}"> {# This nonce is implemented specially in the route itself #}
			<span class="input">
				<input class="input-field" type="text" name="ctf_name" id="ctf_name-input"/>
				<label class="input-label" for="ctf_name-input">
					<span class="label-content" data-content="CTF Name">CTF Name</span>
				</label>
			</span>
			<span class="input">
				<input class="input-field" type="text" name="name" id="username-input" />
				<label class="input-label" for="username-input">
					<span class="label-content" data-content="Username">Admin Username</span>
				</label>
			</span>
			<span class="input">
				<input class="input-field" type="email" name="email" id="email-input" />
				<label class="input-label" for="email-input">
					<span class="label-content" data-content="Email">Admin Email</span>
				</label>
			</span>
			<span class="input">
				<input class="input-field" type="password" name="password" id="password-input" />
				<label class="input-label" for="password-input">
					<span class="label-content" data-content="Password">Admin Password</span>
				</label>
			</span>
			<br/>
			<div class="submit-row text-center">
				<button type="submit" id="submit" tabindex="5" class="btn btn-md btn-theme btn-outlined">Submit</button>
			</div>
		</form>
	</div>
</div>

{% endblock %}

{% block scripts %}
	<script src="{{ request.script_root }}/themes/{{ ctf_theme() }}/static/js/style.js"></script>
{% endblock %}
